<?php

class Obj_DBTable_SpecialOffersSetter extends Zend_Db_Table_Abstract
{
    protected $_name = 'special_offered_objects';
	protected $_primary = 'ID';

    public function getSpecialOffersSetterByObject($id) {
    	$select = $this->select()->from($this)->where('ObjectID = ?', (int) $id);
    	return $this->fetchAll($select)->toArray();
    }
    
    public function getSpecialOffersSetterByOffer($id) {
    	$select = $this->select()->from($this)->where('OfferID = ?', (int) $id);
    	return $this->fetchAll($select)->toArray();
    }    

    public function getAllSpecialOffers() {
    	$select = $this->select()->from($this);
    	return $this->fetchAll($select)->toArray();
    } 

    public function delete($where)
    {
        return $this->_db->delete($this->_name, $where);
    } 	
}